<?php
error_reporting(E_ALL & ~E_STRICT);

// Define path to project directory
define('PROJECT_PATH', realpath(dirname(__FILE__) . '/..'));

// Define path to application directory
define('APPLICATION_PATH', realpath(PROJECT_PATH . '/app'));

// Define path to library directory
define('LIBRARY_PATH', realpath(PROJECT_PATH . '/lib'));

// Define path to library directory
define('CONFIG_PATH', realpath(PROJECT_PATH . '/etc'));

// Define application environment
define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');

// Add library directory to the include path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(PROJECT_PATH . '/lib'),
    realpath(PROJECT_PATH),
    get_include_path()
)));

require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    realpath(PROJECT_PATH . '/etc/app.ini')
);
$application->bootstrap();

$application->getAutoloader()->registerNamespace('Social');
$application->run();